home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_11_09 / 1109060a < prev    next >
Text File  |  1993-07-06  |  524b  |  25 lines

  1. //  winstrm.h
  2.  
  3. #include    "ostrwnd.h"
  4.  
  5. const int winstreambuf_buf_size = 128;
  6. class winstreambuf : public streambuf
  7. {
  8. public:
  9. winstreambuf ();
  10. virtual int sync ();
  11. virtual int overflow (int nCh);
  12. virtual int underflow ()
  13.     {return EOF;}
  14. void set_stream_window (ostreamWnd * wnd)
  15.     {stream_window = wnd;}
  16.  
  17. private:
  18. void reset_buffer ()
  19.     {setp (buffer, buffer + winstreambuf_buf_size - 2);}
  20.     //  Keep epptr within buffer!
  21.  
  22. char buffer [winstreambuf_buf_size];
  23. ostreamWnd * stream_window;
  24. };
  25.